<template>
  <div>
    <!-- 顶部导航栏 -->
    <van-nav-bar
      title="完善信息"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
    <!-- 个人信息 -->
    <van-cell-group>
      <van-field
        v-model="name"
        label="姓名"
        placeholder="请输入您的姓名"
        maxlength="6"
      />
      <van-field
        v-model="idCard"
        label="身份证号"
        placeholder="请输入您的身份证号"
        maxlength="18"
      />
      <van-field
        v-model="address"
        label="现住址"
        placeholder="请输入您的地址"
        maxlength="50"
      />
      <van-field
        v-model="sex"
        label="性别"
        placeholder="请输入您的性别"
        maxlength="1"
      />
      <van-field
        v-model="phone"
        label="手机号码"
        placeholder="请输入您的手机号码"
        maxlength="11"
      />
      <div style="margin: 16px">
        <van-button round block type="info" native-type="submit" @click="submit">提交信息</van-button>
      </div>
    </van-cell-group>
  </div>
</template>
<script>
// NavBar 导航栏
import Vue from "vue";

import { NavBar } from "vant";
Vue.use(NavBar);
// Field 输入框
import { Field } from "vant";
Vue.use(Field);

export default {
  data() {
    return {
      // 双向绑定输入的文本框
      name: "",
      idCard: "",
      address: "",
      sex: "",
      phone: "",
    };
  },
  methods: {
    onClickLeft() {
      this.$router.push("/more");
    },
    submit(){
      this.$router.push("/appointment");
    },
    onClickRight() {},
  },
};
</script>
<style lang="scss" scoped>


</style>